home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  5.6 KB  |  204 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        QDOffscreen.h
  3.  
  4.      Contains:    Quickdraw Offscreen GWorld Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1985-1993, 1995-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18. #ifndef __QDOFFSCREEN__
  19. #define __QDOFFSCREEN__
  20.  
  21. #ifndef __ERRORS__
  22. #include <Errors.h>
  23. #endif
  24. #ifndef __QUICKDRAW__
  25. #include <Quickdraw.h>
  26. #endif
  27.  
  28.  
  29.  
  30. #if PRAGMA_ONCE
  31. #pragma once
  32. #endif
  33.  
  34. #ifdef __cplusplus
  35. extern "C" {
  36. #endif
  37.  
  38. #if PRAGMA_IMPORT
  39. #pragma import on
  40. #endif
  41.  
  42. #if PRAGMA_STRUCT_ALIGN
  43.     #pragma options align=mac68k
  44. #elif PRAGMA_STRUCT_PACKPUSH
  45.     #pragma pack(push, 2)
  46. #elif PRAGMA_STRUCT_PACK
  47.     #pragma pack(2)
  48. #endif
  49.  
  50.  
  51. enum {
  52.     pixPurgeBit                    = 0,
  53.     noNewDeviceBit                = 1,
  54.     useTempMemBit                = 2,
  55.     keepLocalBit                = 3,
  56.     pixelsPurgeableBit            = 6,
  57.     pixelsLockedBit                = 7,
  58.     mapPixBit                    = 16,
  59.     newDepthBit                    = 17,
  60.     alignPixBit                    = 18,
  61.     newRowBytesBit                = 19,
  62.     reallocPixBit                = 20,
  63.     clipPixBit                    = 28,
  64.     stretchPixBit                = 29,
  65.     ditherPixBit                = 30,
  66.     gwFlagErrBit                = 31
  67. };
  68.  
  69.  
  70. enum {
  71.     pixPurge                    = 1L << pixPurgeBit,
  72.     noNewDevice                    = 1L << noNewDeviceBit,
  73.     useTempMem                    = 1L << useTempMemBit,
  74.     keepLocal                    = 1L << keepLocalBit,
  75.     pixelsPurgeable                = 1L << pixelsPurgeableBit,
  76.     pixelsLocked                = 1L << pixelsLockedBit,
  77.     mapPix                        = 1L << mapPixBit,
  78.     newDepth                    = 1L << newDepthBit,
  79.     alignPix                    = 1L << alignPixBit,
  80.     newRowBytes                    = 1L << newRowBytesBit,
  81.     reallocPix                    = 1L << reallocPixBit,
  82.     clipPix                        = 1L << clipPixBit,
  83.     stretchPix                    = 1L << stretchPixBit,
  84.     ditherPix                    = 1L << ditherPixBit,
  85.     gwFlagErr                    = 1L << gwFlagErrBit
  86. };
  87.  
  88. typedef unsigned long                     GWorldFlags;
  89. /* Type definition of a GWorldPtr */
  90. typedef CGrafPtr                         GWorldPtr;
  91. EXTERN_API( QDErr )
  92. NewGWorld                        (GWorldPtr *            offscreenGWorld,
  93.                                  short                     PixelDepth,
  94.                                  const Rect *            boundsRect,
  95.                                  CTabHandle             cTable,
  96.                                  GDHandle                 aGDevice,
  97.                                  GWorldFlags             flags)                                FOURWORDINLINE(0x203C, 0x0016, 0x0000, 0xAB1D);
  98.  
  99. EXTERN_API( Boolean )
  100. LockPixels                        (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x0001, 0xAB1D);
  101.  
  102. EXTERN_API( void )
  103. UnlockPixels                    (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x0002, 0xAB1D);
  104.  
  105. EXTERN_API( GWorldFlags )
  106. UpdateGWorld                    (GWorldPtr *            offscreenGWorld,
  107.                                  short                     pixelDepth,
  108.                                  const Rect *            boundsRect,
  109.                                  CTabHandle             cTable,
  110.                                  GDHandle                 aGDevice,
  111.                                  GWorldFlags             flags)                                FOURWORDINLINE(0x203C, 0x0016, 0x0003, 0xAB1D);
  112.  
  113. EXTERN_API( void )
  114. DisposeGWorld                    (GWorldPtr                 offscreenGWorld)                    FOURWORDINLINE(0x203C, 0x0004, 0x0004, 0xAB1D);
  115.  
  116. EXTERN_API( void )
  117. GetGWorld                        (CGrafPtr *                port,
  118.                                  GDHandle *                gdh)                                FOURWORDINLINE(0x203C, 0x0008, 0x0005, 0xAB1D);
  119.  
  120. EXTERN_API( void )
  121. SetGWorld                        (CGrafPtr                 port,
  122.                                  GDHandle                 gdh)                                FOURWORDINLINE(0x203C, 0x0008, 0x0006, 0xAB1D);
  123.  
  124. EXTERN_API( void )
  125. CTabChanged                        (CTabHandle             ctab)                                FOURWORDINLINE(0x203C, 0x0004, 0x0007, 0xAB1D);
  126.  
  127. EXTERN_API( void )
  128. PixPatChanged                    (PixPatHandle             ppat)                                FOURWORDINLINE(0x203C, 0x0004, 0x0008, 0xAB1D);
  129.  
  130. EXTERN_API( void )
  131. PortChanged                        (GrafPtr                 port)                                FOURWORDINLINE(0x203C, 0x0004, 0x0009, 0xAB1D);
  132.  
  133. EXTERN_API( void )
  134. GDeviceChanged                    (GDHandle                 gdh)                                FOURWORDINLINE(0x203C, 0x0004, 0x000A, 0xAB1D);
  135.  
  136. EXTERN_API( void )
  137. AllowPurgePixels                (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x000B, 0xAB1D);
  138.  
  139. EXTERN_API( void )
  140. NoPurgePixels                    (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x000C, 0xAB1D);
  141.  
  142. EXTERN_API( GWorldFlags )
  143. GetPixelsState                    (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x000D, 0xAB1D);
  144.  
  145. EXTERN_API( void )
  146. SetPixelsState                    (PixMapHandle             pm,
  147.                                  GWorldFlags             state)                                FOURWORDINLINE(0x203C, 0x0008, 0x000E, 0xAB1D);
  148.  
  149. EXTERN_API( Ptr )
  150. GetPixBaseAddr                    (PixMapHandle             pm)                                    FOURWORDINLINE(0x203C, 0x0004, 0x000F, 0xAB1D);
  151.  
  152. EXTERN_API( QDErr )
  153. NewScreenBuffer                    (const Rect *            globalRect,
  154.                                  Boolean                 purgeable,
  155.                                  GDHandle *                gdh,
  156.                                  PixMapHandle *            offscreenPixMap)                    FOURWORDINLINE(0x203C, 0x000E, 0x0010, 0xAB1D);
  157.  
  158. EXTERN_API( void )
  159. DisposeScreenBuffer                (PixMapHandle             offscreenPixMap)                    FOURWORDINLINE(0x203C, 0x0004, 0x0011, 0xAB1D);
  160.  
  161. EXTERN_API( GDHandle )
  162. GetGWorldDevice                    (GWorldPtr                 offscreenGWorld)                    FOURWORDINLINE(0x203C, 0x0004, 0x0012, 0xAB1D);
  163.  
  164. EXTERN_API( Boolean )
  165. QDDone                            (GrafPtr                 port)                                FOURWORDINLINE(0x203C, 0x0004, 0x0013, 0xAB1D);
  166.  
  167. EXTERN_API( long )
  168. OffscreenVersion                (void)                                                        TWOWORDINLINE(0x7014, 0xAB1D);
  169.  
  170. EXTERN_API( QDErr )
  171. NewTempScreenBuffer                (const Rect *            globalRect,
  172.                                  Boolean                 purgeable,
  173.                                  GDHandle *                gdh,
  174.                                  PixMapHandle *            offscreenPixMap)                    FOURWORDINLINE(0x203C, 0x000E, 0x0015, 0xAB1D);
  175.  
  176. EXTERN_API( Boolean )
  177. PixMap32Bit                        (PixMapHandle             pmHandle)                            FOURWORDINLINE(0x203C, 0x0004, 0x0016, 0xAB1D);
  178.  
  179. EXTERN_API( PixMapHandle )
  180. GetGWorldPixMap                    (GWorldPtr                 offscreenGWorld)                    FOURWORDINLINE(0x203C, 0x0004, 0x0017, 0xAB1D);
  181.  
  182.  
  183.  
  184. #if PRAGMA_STRUCT_ALIGN
  185.     #pragma options align=reset
  186. #elif PRAGMA_STRUCT_PACKPUSH
  187.     #pragma pack(pop)
  188. #elif PRAGMA_STRUCT_PACK
  189.     #pragma pack()
  190. #endif
  191.  
  192. #ifdef PRAGMA_IMPORT_OFF
  193. #pragma import off
  194. #elif PRAGMA_IMPORT
  195. #pragma import reset
  196. #endif
  197.  
  198. #ifdef __cplusplus
  199. }
  200. #endif
  201.  
  202. #endif /* __QDOFFSCREEN__ */
  203.  
  204.